-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Remove Symbol
from Named
variant of BoundRegionKind
/LateParamRegionKind
#139598
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Remove Symbol
from Named
variant of BoundRegionKind
/LateParamRegionKind
#139598
Conversation
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
… r=<try> Remove `Symbol` from `Named` variant of `BoundRegionKind`/`LateParamRegionKind` r? `@ghost`
This comment has been minimized.
This comment has been minimized.
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (098a24f): comparison URL. Overall result: ❌✅ regressions and improvements - please read the text belowBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never Instruction countThis is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.
Max RSS (memory usage)Results (primary -0.4%, secondary -0.4%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResults (primary 0.6%, secondary 1.4%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeResults (primary -0.1%, secondary -0.2%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Bootstrap: 780.203s -> 780.55s (0.04%) |
dba712a
to
b749895
Compare
This comment has been minimized.
This comment has been minimized.
☔ The latest upstream changes (presumably #140682) made this pull request unmergeable. Please resolve the merge conflicts. |
b749895
to
20eebb2
Compare
This is ready to review I think. |
rustbot has assigned @WaffleLapkin. Use |
HIR ty lowering was modified cc @fmease |
This comment has been minimized.
This comment has been minimized.
@rustbot author |
20eebb2
to
69c5275
Compare
☔ The latest upstream changes (presumably #143057) made this pull request unmergeable. Please resolve the merge conflicts. |
69c5275
to
43b2648
Compare
@compiler-errors is
S-waiting-on-author
|
naur @rustbot ready |
☔ The latest upstream changes (presumably #143091) made this pull request unmergeable. Please resolve the merge conflicts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me with/out nits
} else { | ||
None | ||
} | ||
if let Some(name) = lt.get_name(tcx) { Some(name.as_str().to_string()) } else { None } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this would probably be more readable with .map()
Some(name) => name, | ||
None => sym::anon, | ||
} | ||
} | ||
|
||
/// Is this region named by the user? | ||
pub fn has_name(self) -> bool { | ||
pub fn has_name(self, tcx: TyCtxt<'tcx>) -> bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason why you renamed EarlyParamRegion::has_name
to is_named
, but not this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope :) i just forgor
they should all have the same name i think
/* not an anonymous region */ | ||
debug!("try_report_named_anon_conflict: not an anonymous region"); | ||
return None; | ||
} | ||
if !anon_param_info.kind.is_named(self.tcx()) { | ||
// Anon region | ||
} else { | ||
/* not an anonymous region */ | ||
debug!("try_report_named_anon_conflict: not an anonymous region"); | ||
return None; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: swapping the branches would be more readable I think
The
Symbol
is redundant, since we already store aDefId
in the region variant. Instead, load the name viaitem_name
when needed (which is almost always on the diagnostic path).This introduces a
BoundRegionKind::NamedAnon
which is used for giving anonymous bound regions names, but which should only be used during pretty printing and error reporting.